package com.xinhe.web.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "优惠券详情")
@Table(name = "tb_coupon")
public class Coupon {
    @Id
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("名称")
    private String name;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("截止有效期")
    private Date expireTime;
    @ApiModelProperty("金额")
    private BigDecimal money;
    @ApiModelProperty("满足金额")
    private BigDecimal satisfyMoney;
    @ApiModelProperty("类型 FULL_DISCOUNT(\"满减券\"),NO_THRESHOLD(\"代金券\");")
    private String type;
    @ApiModelProperty("状态 ENABLE(\"启用\"),DISABLE(\"禁用\");")
    private String status;
}
